#/usr/bin/perl

package evaluation4edu::Report;
use strict;
use warnings;
use DBI;
use Carp;
use Dancer ':syntax';
use Data::Dumper;
use 5.10.1;

sub new {
	my ( $self,$db_name ) = @_;
	#启动时进行DB连接
	my $db_conn=DBI->connect($db_name,'','', {
			RaiseError => 1,
			AutoCommit => 1,
		}
	) or croak '连接DB失败';

	#设置DBtrace
	$db_conn->trace(4,'dbi_trace.log');

	bless {
		db_conn => $db_conn,
	};
}

sub reload_db {
}

sub sub_call {
	my ( $self,$func_name ) = @_;
	defined $self or croak 'uninitialize';

	return{
	} -> {$func_name};
}
